<template>
    <div class="home-index">
        <div @click="handleStay()">
            <a><img src="/images/iconList/icon01.png"/></a>
            <p class="icon-desc">住宿</p>
        </div>
        <div @click="handleTraffic()">
            <a><img src="/images/iconList/icon02.png"/></a>
            <p class="icon-desc">交通</p>
        </div>
        <div @click="handleEat()">
            <a><img src="/images/iconList/002.jpg"/></a>
            <p class="icon-desc">美食</p>
        </div>
        <div>
            <a><img src="/images/iconList/001.jpg"/></a>
            <p class="icon-desc">天气</p>
        </div>
    </div>
</template>

<script>
    export default {
        name: "HomeIndex",
        methods:{
            handleStay(){
                this.$router.push("/homeStay")
            },
            handleTraffic(){
                this.$router.push("/homeTraffic")
            },
            handleEat(){
                this.$router.push("/homeEat")
            }

        }
    }
</script>

<style scoped>
img{
    width: 41px;
    height: 41px;
}
.home-index{
    display: flex;
    justify-content: space-between;
    margin-left: 8%;
    width: 74%;
    padding: 1% 6%;
    border: 2px solid #0c5460;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    z-index: 120;
    top: 20%;
    left: 42%;
    transform: translate(-50%,-50%);
    background: #ffffff;
}
.icon-desc{
    padding-top: .2rem;
    text-align: center;
    font-size: 1.1em;
    margin-top: 0.05rem;
    color: black;
}

</style>